﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Controller;
using Interfaces;
using Model;

namespace GUI
{
    public partial class TilbudsRapport : Form
    {
        vandspareSystem VandspareSystem;
        List<ITilbudsrapport> tilbudslinier = new List<ITilbudsrapport>();


        public TilbudsRapport(vandspareSystem VandspareSystem, DateTime dato)
        {
            this.VandspareSystem = VandspareSystem;
            tilbudslinier = VandspareSystem.TilbudsRapport(dato);
            InitializeComponent();
            
        }


        private void TilbudsRapport_Load(object sender, EventArgs e)
        {
            this.tilbudsrapportBindingSource.DataSource = tilbudslinier;
            
            this.reportViewer1.RefreshReport();
            
        }


        private void TilbudsRapport_FormClosing(object sender, FormClosingEventArgs e)
        {
            reportViewer1.LocalReport.ReleaseSandboxAppDomain();
        }
    }
}
